home *** CD-ROM | disk | FTP | other *** search
/ Floppyshop 2 / Floppyshop - 2.zip / Floppyshop - 2.iso / art&graf.ix / art-3139 / boot_pic.mug / boot_art.s next >
Text File  |  1987-04-21  |  2KB  |  89 lines

  1. ;
  2. ; ART Director Picture Booter v1.0
  3. ; --------------------------------
  4. ;
  5. ; Coded by: Mike Mee (although header credits MUG U.K !!)
  6. ;
  7. ; v1.0 - Adapted from NeoChrome Booter v2.0 from PVK v2.1
  8. ;
  9.  
  10. ; ART Director pictures:-        0 - 31999 = picture data
  11. ;            32000 - 32033 = 1st palette data
  12. ;            32034 - 32512 = other palettes
  13.  
  14. pic_adr    equ    $20000
  15.  
  16. yes    equ    1
  17. no    equ    0
  18.  
  19. text_on    equ    no    ; no = saving of 12 bytes+length of text
  20.  
  21.     opt    p+,o+,d-,s-
  22.  
  23.     bra.s    start
  24.     dc.b    "Coded by: MUG U.K",191," - 15/10/1991",0
  25.  
  26. start    
  27.     ifne    text_on
  28.     pea     text(pc) 
  29.     move.w  #9,-(a7)
  30.     trap    #1
  31.     addq.w  #6,a7
  32.     endc
  33.  
  34.     lea    filename(pc),a0    ; file to load
  35.     move.l    #pic_adr,d6    ; destination address
  36.     move.l    #32512,d7     ; length = 32066
  37.  
  38. loadit    lea    handle(pc),a6    
  39.     clr.w    -(a7)         ; mode = 0 (open to read)
  40.     move.l    a0,-(a7)        ; filename to open
  41.     move.w    #$3d,-(a7)    ; f_open
  42.     trap    #1        ; do it !!
  43.     addq.l    #8,a7        ; tidy stack
  44.     move.w    d0,(a6)         ; store file handle returned
  45.  
  46.     move.l    d6,-(a7)        ; address to load to
  47.     move.l    d7,-(a7)        ; amount to read in
  48.     move.w    d0,-(a7)        ; file handle
  49.     move.w    #$3f,-(a7)    ; f_read
  50.     trap    #1        ; do it
  51.     adda.l    #$c,a7        ; tidy stack
  52.  
  53.     move.w    (a6),-(a7)    ; file handle
  54.     move.w    #$3e,-(a7)    ; f_close
  55.     trap    #1        ; do it !!
  56.     addq.l    #4,a7        ; tidy stack
  57.  
  58.     lea    pic_adr+32000,a0    ; pictures palette
  59.     lea    $ffff8240.W,a1    ; ST palette
  60.     movem.l    (a0),d0-d7    ; move from one
  61.     movem.l    d0-d7,(a1)    ; to the other
  62.  
  63.     move.l    $44e.w,a0        ; current screen address
  64.     lea    pic_adr,A1    ; source
  65.     move.w    #$1F3F,D0        ; (32000/4)-1 = $1F3F (7999)
  66. bmove    move.l    (A1)+,(A0)+    ; move it
  67.     dbf    d0,bmove        ; loop
  68.  
  69. exit    rts            ; bye bye
  70.  
  71. filename    dc.b    '\testfile.art',0
  72.  
  73.     ifne    text_on
  74. text    dc.b    $1B,'E'
  75.     dc.b    'Picture Loading !!',0
  76.     endc
  77.  
  78. handle    ds.w    1
  79.  
  80. ;
  81. ; Alter length of 'blanks' to ensure length of bootsector is equal
  82. ; to 480 bytes !!
  83. ;
  84.     ifne    text_on
  85. blanks    ds.w    147    ; amount when text function is on
  86.     elseif
  87. blanks    ds.w    164    ; and when it's off
  88.     endc
  89.